#include<iostream>
using namespace std;
class A
{
public:
	virtual void func(int x = 1)
	{
		cout << "A->" << x << endl;
	}
	virtual void test()
	{
		func();
	}
	
};

class B : public A
{
public:
	void func(int x = 0)
	{
		cout << "B->" << x << endl;
	}

	/*virtual void test()
	{
		func();
	}*/
};

int main()
{
	A* p = new B;
	p->test();
	return 0;
}